package com.tbit.uqbike.constant.enums;

import java.util.Objects;

/**
 *人脸识别方案枚举
 *
 * @author <a href="mailto:zhang.zhiliang@tbit.com.cn">Zhang ZhiLiang</a>
 * @version 1.0
 * @see <a href="http://adsl1.tbit.com.cn:21490/pages/viewpage.action?pageId=82182491">订单号规范</a>
 * @since 2025/2/21
 */
public enum FaceCheckTypeEnum {
    YOUQU("优驱"),
    ALI_YUN("阿里云"),
    YOUQU_ZIYAN("优驱自研"),
    YOUQU_TENCENT("优驱腾讯"),
    TENCENT_YUN("腾讯云"),
    OTHER(null)
    ;

    private final String name;

    FaceCheckTypeEnum(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    /**
     * 根据名称获取枚举
     * @param name
     * @return
     */
    public static FaceCheckTypeEnum getByName(String name){
        for (FaceCheckTypeEnum value : FaceCheckTypeEnum.values()) {
            if (Objects.equals(name,value.getName())){
                return value;
            }
        }
        return OTHER;
    }
}
